<?php
$str='AA';
echo str_pad($str, 61,'0X',STR_PAD_BOTH);